﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace AutofacDemo1.Services
{
    public interface IMyService
    {
        public string SayHi(string name);
    }

    public class MyService : IMyService
    {
        public string SayHi(string name)
        {
            return $"hello {name}";
        }
    }


    [AutomaticInjection]
    public class MyService2 : IMyService
    {
        public string SayHi(string name)
        {
            return $"你好 {name}";
        }
    }
}
